var exec = require('cordova/exec');

exports.onceLocation=function (success,error) {
    exec(success, error, 'cordova-plugin-rf-amap', 'onceLocation', []);
};
exports.startBackgroundLocation= function (uploadInterval,success, error) {
    exec(success, error, 'cordova-plugin-rf-amap', 'startBackgroundLocation', [uploadInterval || 10]);
};
exports.stopBackgroundLocation=function (success, error) {
    exec(success, error, 'cordova-plugin-rf-amap', 'stopBackgroundLocation', []);
};
exports.isBackgroundLocationRunning=function (success, error) {
    exec(success, error, 'cordova-plugin-rf-amap', 'isBackgroundLocationRunning', []);
};
exports.getLastLocation=function (success, error) {
    exec(success, error, 'cordova-plugin-rf-amap', 'getLastLocation', []);
}
